function check_job_status() {
    var n = new Date().getTime();
    d3.json('/pp_locator/job_status?jid=' + d3.select('#job-id').text() + '&check=1&n=' + n).then(function (data) {
        if (data.status === 'free') {
            window.location.reload();
        }
    });
}